//
//  DYJShareAndCollectionTool.m
//  Piece
//
//  Created by dllo on 16/6/13.
//  Copyright © 2016年 Northeast Dianli University. All rights reserved.
//

#import "DYJShareAndCollectionTool.h"

@implementation DYJShareAndCollectionTool
#pragma mark — 弹出更多菜单:
+ (void)showPopMenuViewWithMenuWithView:(UIView *)view {
    NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:3];
    MenuItem *menuItem = [[MenuItem alloc] initWithTitle:@"微信好友" iconName:@"more_wechat" glowColor:[UIColor grayColor] index:0];
    [items addObject:menuItem];
    
    menuItem = [[MenuItem alloc] initWithTitle:@"朋友圈" iconName:@"more_moments" glowColor:[UIColor colorWithRed:0.44 green:0.88 blue:0.55 alpha:1.00] index:0];
    [items addObject:menuItem];
    
    menuItem = [[MenuItem alloc] initWithTitle:@"微博" iconName:@"more_sina" glowColor:[UIColor colorWithRed:0.98 green:0.51 blue:0.40 alpha:1.00] index:0];
    [items addObject:menuItem];
    
    menuItem = [[MenuItem alloc] initWithTitle:@"QQ" iconName:@"more_qq" glowColor:[UIColor colorWithRed:0.29 green:0.69 blue:0.84 alpha:1.00] index:0];
    [items addObject:menuItem];
    
    menuItem = [[MenuItem alloc] initWithTitle:@"复制链接" iconName:@"more_link" glowColor:[UIColor colorWithRed:0.40 green:0.60 blue:0.85 alpha:1.00] index:0];
    [items addObject:menuItem];
    
    menuItem = [[MenuItem alloc] initWithTitle:@"收藏" iconName:@"more_collection" glowColor:[UIColor colorWithRed:0.96 green:0.79 blue:0.25 alpha:1.00] index:0];
    [items addObject:menuItem];
    
    PopMenu *popMenu = [[PopMenu alloc] initWithFrame:view.bounds items:items];
    popMenu.menuAnimationType = kPopMenuAnimationTypeNetEase; // kPopMenuAnimationTypeSina
    popMenu.perRowItemCount = 3; // or 2
    [popMenu showMenuAtView:view];
}

@end
